package com.yz.design.strategyAndChain;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 策略工厂
 * @Auther: wuzhazha
 */
public class ReceiptHandleStrategyFactory {

    private final static Map<String, IReceiptHandleStrategy> receiptHandleStrategyMap = new HashMap<String, IReceiptHandleStrategy>() {
        {
            put("MT1101", new Mt1101ReceiptHandleStrategy());
            put("MT2101", new Mt2101ReceiptHandleStrategy());
            put("MT8104", new Mt8104ReceiptHandleStrategy());
        }
    };


    public static IReceiptHandleStrategy getReceiptHandleStrategy(String receiptType) {
        return receiptHandleStrategyMap.get(receiptType);
    }
}